// 财务管理模块
import FinanceRoutes from 'views/finance/index.routes.js'
// 系统管理模块
import SettingRoutes from 'views/setting/index.routes.js'
// 用户模块模块
import UserRoutes from 'views/user/index.routes.js'
// 捎货模块
import ShaohuoRoutes from 'views/shaohuo/index.routes.js'
// 核心模块
import CoreRoutes from 'views/core/index.routes.js'

import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

const router = new Router({
  // mode: 'history',
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    ...FinanceRoutes,
    ...SettingRoutes,
    ...UserRoutes,
    ...ShaohuoRoutes,
    ...CoreRoutes,
    {
      path: '*',
      redirect: '/login'
    }
  ]
})

export default router
